import android

droid = android.Android()

class ContactTools(android.Android):
    def __init__(self):
        self.contacts_min_dict = {}
        super(ContactTools, self).__init__()
        
        self.contacts = self.contactsGet()

    def attributes(self):
        print self.contactsGetAttributes()
        
    def fetch_min_data(self):
        contacts_dict = self.contacts_min_dict
        for contact in self.contacts[1]:
            try:
                contacts_dict[contact['_id']] = contact['name']
            except:
                pass
        return contacts_dict
    
    def print_min_data(self):
        min_data = self.fetch_min_data()
        for data in min_data:
            print data, '\n\n'
        
    def print_contacts(self):
        for contact in self.contacts[1]:
            print contact, '\n\n'
            
    def fetch_phone_numbers(self):
        for contact in self.contacts:
            print contact, '\n'
            
            
if __name__ == '__main__':
    contact_tools = ContactTools()
    contact_tools.fetch_phone_numbers()
    #contact_tools.print_contacts()
    #contact_tools.print_min_data()
    
        
        

